package ICM.server;

import java.sql.*;

public class DBManager {
	private static DBManager manager=null;
	private static Connection conn=null;
	/**ddd
	 * Constructor
	 */
	private DBManager(){
		try {
			Class.forName("com.mysql.jdbc.Driver").newInstance();
		} catch (Exception e) {
			
			e.printStackTrace();
			return;
		} 
		try {


			conn = DriverManager.getConnection("jdbc:mysql://localhost/icm","root","s7v65t4g");

			
			
		} catch (SQLException e) {
			
			e.printStackTrace();
			return;
		}
		
	}
	 
	/**
	 * Get instance of DBManager
	 * @return
	 */
	public static DBManager getInstance(){
		if (manager==null)
			manager=new DBManager();
		return manager;
	}

	public  Connection getConnection(){
		return conn;
	}
}
